package com.unicorn.entity;

import com.unicorn.base.BaseEntry;
import com.unicorn.entity.enums.UserStatus;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by Administrator on 2016/11/4.
 */
@DynamicInsert
@DynamicUpdate
@Entity
@Table(name = "sys_users")
public class Users extends BaseEntry {

    @Column(columnDefinition = "varchar(50) NOT NULL")
    private String username;

    @Column(columnDefinition = "varchar(100) NOT NULL")
    private String password;

    @Column(columnDefinition = "varchar(100)")
    private String email;

    @Column(columnDefinition = "varchar(100)")
    private String note;

    @Column(columnDefinition = "varchar(20)")
    @Enumerated(EnumType.STRING)
    private UserStatus status=UserStatus.NORMAL;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public UserStatus getStatus() {
        return status;
    }

    public void setStatus(UserStatus status) {
        this.status = status;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}
